from common.my_file import MyFile
from baidu_baoxue import *
from baidu_baoyu import *
from baidu_dazongshangpin_kucun import *
from baidu_gangkou import *
from baidu_ganhan import *
from baidu_guojiguanxi import *
from baidu_guojiguanxi_jinjizhuangtai import *
from baidu_guojiguanxi_maoyi import *
from baidu_guojiguanxi_maoyi2 import *
from baidu_hangkong import *
from baidu_hangye_lvyou import *
from baidu_hangyungongsi import *
from baidu_hongguan_huobi import *
from baidu_huoshan import *
from baidu_kejipinpai import *
from baidu_lianheguo import *
from baidu_meiguo import *
from baidu_meilianchu import *
from baidu_nongyebu import *
from baidu_qihuojiaoyisuo import *
from baidu_waiguozhengce import *
from baidu_waihui import *
from baidu_ziyuanchubei import *
from hongguanshuju_fagaiwei import *
from hongguanshuju_guowuyuan import *
from hongguanshuju_shangwubu import *
from hongguanshuju_shangwubu_tongjishuju import *
from ziranzaihai_dizhen import *


import os

if __name__ == '__main__':
    lock_file = open('./out/' + os.path.split(__file__)[-1].split(".")[0] + ".lock", 'a', encoding = 'utf-8')
    if False == MyFile.lock_file(lock_file):
        quit()
        
    log_file = open('./out/' + os.path.split(__file__)[-1].split(".")[0] + ".log", 'a', encoding = 'utf-8')
    MyFile.wrtie_log(log_file, "------------------开始")
    '''
    MyFile.wrtie_log(log_file, "暴雪")
    baoxue_api()
    MyFile.wrtie_log(log_file, "暴雨")
    baoyu_api()
    MyFile.wrtie_log(log_file, "大宗商品")
    dazongshangpin_api()
    MyFile.wrtie_log(log_file, "港口")
    gangkou_api()
    MyFile.wrtie_log(log_file, "干旱")
    ganhan_api()
    MyFile.wrtie_log(log_file, "国际关系")
    guojiguanxi_api()
    '''
    MyFile.wrtie_log(log_file, "紧急状态")
    guojiguanxi_jinjizhuangtai_api()
    MyFile.wrtie_log(log_file, "贸易")
    guojiguanxi_maoyi_api()
    MyFile.wrtie_log(log_file, "贸易2")
    guojiguanxi_maoyi2_api()
    MyFile.wrtie_log(log_file, "航空")
    hangkong_api()
    MyFile.wrtie_log(log_file, "旅游")
    lvyou_api()
    '''
    MyFile.wrtie_log(log_file, "航运公司")
    hangyungongsi_api()
    MyFile.wrtie_log(log_file, "货币")
    hongguan_huobi_api()
    MyFile.wrtie_log(log_file, "火山")
    huoshan_api()
    MyFile.wrtie_log(log_file, "联合国")
    lianheguo_api()
    MyFile.wrtie_log(log_file, "美国")
    meiguo_api()
    MyFile.wrtie_log(log_file, "央行")
    meilianchu_api()
    MyFile.wrtie_log(log_file, "农业部")
    nongyebu_api()
    MyFile.wrtie_log(log_file, "期货交易所")
    qihuojiaoyisuo_api()
    MyFile.wrtie_log(log_file, "外国政策")
    waiguozhengce_api()
    MyFile.wrtie_log(log_file, "外汇")
    waihui_api()
    MyFile.wrtie_log(log_file, "资源储备")
    ziyuanchubei_api()
    MyFile.wrtie_log(log_file, "发改委")
    fagaiwei_api()
    MyFile.wrtie_log(log_file, "国务院")
    guowuyuan_api()
    MyFile.wrtie_log(log_file, "商务部")
    shangwubu_api()
    MyFile.wrtie_log(log_file, "商务部统计数据")
    shangwubu_tongji_api()
    MyFile.wrtie_log(log_file, "地震")
    dizhen_api()
    '''
    MyFile.wrtie_log(log_file, "------------------结束")
    log_file.close()
    lock_file.close()